import { _decorator, Component, director, error, Node } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('mainScript')
export class mainScript extends Component {
    start() {

    }

    update(deltaTime: number) {
        
    }

    public onStartButtonClick(){
        director.loadScene("01-gameScene",(error, scene) => {
            if (error) {
                console.log(`加载场景失败: ${error.message}`);
            } else {
                console.log("场景加载成功");
            }
        }
        );
        console.log("开始按钮被点击了");
        // 这里可以添加开始游戏的逻辑
    }
}

